#ifndef __GRID_H__
#define __GRID_H__

#include "stdafx.h"
#include "Node.h"
#include "Bounding.h"
#include <vector>
#include "vec3.h"
#include "VBO.h"
#define GridHeight 0.1

class Player;

#define NearDistance 5
#define MediumDistance 8

#define NearColor vec3(1,0,0)
#define MediumColor vec3(1,1,0)
#define FarColor vec3(0,1,0)

class Grid : public BBox
{
	VBO vbo; GLuint id1, id2;
public:
	Grid(vec3 pos = vec3(), vec3 size = vec3());

	// Check if a bounded node is in this grid
	// Node must be a BSphere or BBox
	bool isNodeInGrid(Node *b);

	static const int Max_Y_Bound = 1;

	void Update(float delta);

	void Draw(void);

	vec3 color; float alpha;

	int row, col;
	DetailLevel detail_level;

	Player *player;
};

#endif